:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
}

.header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transform: translateY(-100px);
}

.header.loaded {
    opacity: 1;
    animation: headerEntry 1s forwards;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: textGlow 2s ease-in-out 1s infinite alternate;
}

.header h2 {
    font-size: 1.8rem;
    font-weight: 300;
}

.model-container {
    margin-top: 20px;
    transform: translateY(100px);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 5%;
    justify-content: center;
}

.model-container.loaded {
    opacity: 1;
    animation: modelEntry 1s cubic-bezier(0.2, 0.6, 0.3, 1.2) forwards;
}

.api-model {
    flex: 1;
    min-width: 300px;
    max-width: 430px;
    height: 430px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
    padding-bottom: 0px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 参数区域占据剩余空间 */
.params {
    flex-grow: 1;
}

.api-model:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 123, 255, 0.2);
}

.api-model h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 0;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    transition: all 0.5s ease;
    animation-delay: 1s;
}

/* 单独卡片入场微调 */
.api-model:nth-child(1) {
    animation-delay: 1.2s;
}

.api-model:nth-child(2) {
    animation-delay: 1.4s;
}

.api-model:nth-child(3) {
    animation-delay: 1.6s;
}

.try-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    display: block;
    margin-top: auto;
    /* 自动填充上方空间 */
    align-self: center;
    /* 水平居中 */
    margin-bottom: 1.5rem;
    /* 初始隐藏 */
    animation: buttonSlideUp 0.5s ease forwards;
}


.try-button:hover {
    background-color: #2980b9;
}


/* 新增加载动画样式 */
.loader {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .model-container {
        flex-direction: column;
        align-items: center;
    }

    .api-model {
        width: 90%;
        max-width: none;
    }
}

/* 新增动画关键帧 */
@keyframes headerEntry {
    0% {
        transform: translateY(-100px);
    }

    70% {
        transform: translateY(20px);
        animation-timing-function: cubic-bezier(0.5, 1.8, 0.8, 1.2);
    }

    85% {
        transform: translateY(-10px);
    }

    95% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(0);
    }
}


/* 添加标题呼吸灯效果 */
@keyframes textGlow {
    from {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }

    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
}


/* 新增模型容器入场动画 */
@keyframes modelEntry {
    0% {
        transform: translateY(100px);
    }

    65% {
        transform: translateY(-20px);
        animation-timing-function: cubic-bezier(0.3, 1.5, 0.7, 0.9);
    }

    80% {
        transform: translateY(10px);
    }

    95% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* 添加整体容器过渡 */
#app {
    opacity: 0;
    transition: opacity 0.5s ease;
}